<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
    <div class="main">
        <div class="sidebar">
            <div class="menu_wrap">
                <!--menu-->
                <div class="menu">
                    <div class="menu_title"><?php echo $category[0][0][lang('field_category_title')];?></div>
                    <ul>
                    <?php if (isset($category[$category[0][0]['id']])){ foreach ($category[$category[0][0]['id']] as $m){?>
                        <li <?php echo $m['id']==$menu_selected?'class="selected"':'';?>>
                        <a href="<?php echo site_url($m['list_uri'].'/'.$m['id']);?>"><?php echo $m[lang('field_category_title')];?></a>
                        </li>             
                    <?php }}?>
                    </ul>
                </div>
            </div>
            <div class="contact_wrap">
                <div class="contact">
                <!--side contact start-->
                <?php echo ${lang('field_side_contact')};?>
                <!--side contact end-->
                </div>
            </div>
        </div>
        <div class="mainbody">
            <div class="title_wrap">
                <!--title-->
                <div class="sitemap">
                <?php echo lang('page_location');?>：
                <?php foreach ($location as $l){?>
                    <?php if($l['link']){?>
                    <span><?php echo $l['link'];?></span>
                    <?php }?>
                    <?php if($l['url']){?>
                    <a href="<?php echo site_url($l['url']);?>"><?php echo $l['title'];?></a>
                    <?php }else {?>
                    <span><?php echo $l['title'];?></span>
                    <?php }?>
                <?php }?>
                </div>
                <h1><?php echo ${lang('field_content_title')};?></h1>
            </div>
            <div class="content_wrap">
                <!--content-->
                <?php echo ${lang('field_content_content')};?>
                <table class="noBorder" style="text-align:left">
                    <tr>
                        <td style=" width:80%"><?php echo lang('page_content_prev');?>：
                        <?php if(empty($prev)){?>
                        <span><?php echo lang('page_content_none');?></span>
                        <?php }else {?>
                        <a href="<?php echo site_url($prev['uri'].'/'.$prev['id']);?>"><?php echo $prev[lang('field_content_title')]?></a>
                        <?php }?>
                        </td>
                        <td rowspan="2" style=" text-align:right; vertical-align:bottom;">
                            <a href="javascript:window.history.go(-1)"><?php echo lang('page_go_back');?></a>
                        </td>
                    </tr>
                    <tr>
                        <td><?php echo lang('page_content_next');?>：
                        <?php if(empty($next)){?>
                        <span><?php echo lang('page_content_none');?></span>
                        <?php }else {?>
                        <a href="<?php echo site_url($next['uri'].'/'.$next['id']);?>"><?php echo $next[lang('field_content_title')]?></a>
                        <?php }?>
                        </td>
                    </tr>
                </table>
                <!--content-->
            </div>    
        </div>
        <div class="clearFloat"></div>
    </div>
    <script type="text/javascript">
        $.getJSON("<?php echo site_url('ajax/content_handle/click').'?id='.$id?>");
    </script>